package com.project.web.admin.controller.common;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yun.common.utils.plupload.Plupload;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 文件上传控制器
 */
@Controller
public class UploadController extends PluploadController {

    private static final long serialVersionUID = -809479395946769047L;

    /**
     * 页面异步上传
     *
     * @param plupload 上传插件
     * @param request  Request请求对象
     * @return
     */
    @ResponseBody
    @RequestMapping(value = {"/admin/upload"})
    public Map<String, Object> upload(Plupload plupload, HttpServletRequest request) {
        return super.upload(plupload, request);
    }
}
